package cn.ym.mall.service;

import cn.ym.mall.entity.Announcement;
import cn.ym.mall.vo.Page;


import java.sql.SQLException;

/**
 * 赵金明
 * 公告service层
 * 2022/8/12
 */
public interface AnnouncementService {
    /**
     * 添加公告
     * @param announcement
     * @return返回成功的条数
     * @throws SQLException
     */
    public boolean addAnnouncement(Announcement announcement) throws SQLException;

    /**
     * 通过公告id删除公告
     * @param aceid
     * @return
     * @throws SQLException
     */
    public boolean deleteByAceid(Integer aceid) throws SQLException;

    /**
     *通过公告id查询公告
     * @param aceid
     * @return
     * @throws SQLException
     */
    public Announcement getAnnouncementByAceid(Integer aceid) throws SQLException;

    /**
     *分页查询公告
     * @param pageNo
     * @param pageSize
     * @return
     * @throws SQLException
     */
    public Page<Announcement> getPageAnnouncement(Integer pageNo, Integer pageSize) throws SQLException;
}
